import request from '@/utils/request'

export function getListPage(query) {
  return request({
    url: '/sysm/application/',
    method: 'get',
    params: query
  })
}

export function getAppList(query) {
  return request({
    url: '/sysm/application/listSelect',
    method: 'get',
    params: query
  })
}

export function getListApp(query) {
  return request({
    url: '/sysm/application/listApp',
    method: 'get',
    params: query
  })
}

export function saveOrUpdate(param) {
  return request.post('/sysm/application/', JSON.stringify(param))
}

export function updateStatus(param) {
  return request({
    url: `/sysm/application/updateStatus`,
    method: 'post',
    params: param
  })
}

export function deleteById(id) {
  return request({
    url: `/sysm/application/${id}`,
    method: 'delete'
  })
}

export function getListAll() {
  return request({
    url: `/sysm/application/list`,
    method: 'get'
  })
}
